package com.pathfinder.utils;

import java.util.ArrayList;
import java.util.List;

/**
 * Date: 08.05.11
 *
 * @author Victor Passichenko (vpas@yandex-team.ru)
 */
public class CollectionUtils {

    public static <A, B> List<B> mapList(Function<A, B> f, List<A> from) {
        List<B> result = new ArrayList<B>(from.size());
        for (A a : from) {
            result.add(f.apply(a));
        }
        return result;
    }

}
